import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JLabel;
import javax.swing.ImageIcon;
import java.awt.Color;
import java.awt.Component;
import java.awt.FlowLayout;
import javax.swing.JToggleButton;
import java.awt.GridBagLayout;
import java.awt.GridBagConstraints;
import java.awt.Insets;
import javax.swing.ButtonGroup;
import java.awt.CardLayout;
import javax.swing.JTextField;
import javax.swing.JComboBox;
import javax.swing.border.LineBorder;
import javax.swing.JButton;
import javax.swing.JSpinner;
import javax.swing.SpinnerNumberModel;
import javax.swing.JTextArea;
import java.awt.Cursor;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Panel;
import java.awt.Dimension;
import javax.swing.JScrollPane;
import javax.swing.JList;


public class Informes extends JFrame {

	private JPanel contentPane;
	private final JPanel panel = new JPanel();
	private final JPanel pnlBotones = new JPanel();
	private final JToggleButton btnDaG = new JToggleButton("Datos Generales");
	private final JToggleButton btnInfo = new JToggleButton("Información");
	private final JToggleButton tglbtnDatosAdjuntos = new JToggleButton("Datos Adjuntos");
	private final ButtonGroup buttonGroup = new ButtonGroup();
	private final JPanel pnlContenido = new JPanel();
	private final JPanel pnlGeneral = new JPanel();
	private final JLabel lblNombre = new JLabel("Nombre:");
	private final JLabel lblFechaDeCreacin = new JLabel("Fecha:");
	private final JLabel lblPaciente = new JLabel("Paciente:");
	private final JLabel lblSaniario = new JLabel("Saniario:");
	private final JTextField textField = new JTextField();
	private final JTextField textField_1 = new JTextField();
	private final JTextField textField_2 = new JTextField();
	private final JComboBox comboBox = new JComboBox();
	private final JLabel lblInicioTratamiento = new JLabel("Inicio Tratamiento:");
	private final JLabel lblNSesiones = new JLabel("Nº Sesiones:");
	private final JLabel lblNewLabel = new JLabel("Fin Tratamiento:");
	private final JTextField textField_3 = new JTextField();
	private final JTextField textField_5 = new JTextField();
	private final JSpinner spinner = new JSpinner();
	private final JButton btnInicio = new JButton("");
	private final JButton button = new JButton("");
	private final JLabel lblNotasDiagnostico = new JLabel("Notas:");
	private final JButton btnGuardar = new JButton("Guardar");
	private final JButton btnModificar = new JButton("Modificar");
	private final JButton btnBorrar = new JButton("Borrar");
	private final Panel panel_1 = new Panel();
	private final JPanel pnlInfo = new JPanel();
	private final JLabel lblNewLabel_1 = new JLabel("Antecedentes:\n");
	private final JTextArea taNotas = new JTextArea();
	private final JTextArea taAntecedentes = new JTextArea();
	private final JLabel lblNewLabel_2 = new JLabel("Pruebas Realizadas");
	private final JTextArea taPruebas = new JTextArea();
	private final JLabel lblNewLabel_3 = new JLabel("Tratamiento");
	private final JTextArea textArea_1 = new JTextArea();
	private final JScrollPane scrollPane = new JScrollPane();
	private final JScrollPane scrollPane_1 = new JScrollPane();
	private final JScrollPane scrollPane_2 = new JScrollPane();
	private final JScrollPane scrollPane_3 = new JScrollPane();
	private final JPanel panel_2 = new JPanel();
	private final JLabel lblNewLabel_4 = new JLabel("");
	private final JPanel pnlDatos = new JPanel();
	private final JList list = new JList();
	private final JLabel label = new JLabel("New label");
	private final JButton btnCargarFoto = new JButton("Cargar Foto");

	/**
	 * Launch the application.
	 
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					Informes frame = new Informes();
					frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	
	 * Create the frame.
	 */
	public Informes() {
		textField_5.setColumns(10);
		textField_3.setColumns(10);
		textField_2.setEditable(false);
		textField_2.setColumns(10);
		textField_1.setColumns(10);
		textField.setColumns(10);
		setTitle("Informes");
		setResizable(false);
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 1028, 702);
		contentPane = new JPanel();
		contentPane.setBackground(Color.WHITE);
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		contentPane.setLayout(new BorderLayout(0, 0));
		setContentPane(contentPane);
		{
			contentPane.add(panel, BorderLayout.CENTER);
		}
		panel.setLayout(new BorderLayout(0, 0));
		{
			pnlBotones.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
			panel.add(pnlBotones, BorderLayout.WEST);
		}
		GridBagLayout gbl_pnlBotones = new GridBagLayout();
		gbl_pnlBotones.columnWidths = new int[]{146, 0};
		gbl_pnlBotones.rowHeights = new int[]{29, 0, 0, 0, 0, 0};
		gbl_pnlBotones.columnWeights = new double[]{0.0, Double.MIN_VALUE};
		gbl_pnlBotones.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		pnlBotones.setLayout(gbl_pnlBotones);
		{
			GridBagConstraints gbc_btnDaG = new GridBagConstraints();
			gbc_btnDaG.insets = new Insets(0, 0, 5, 0);
			gbc_btnDaG.anchor = GridBagConstraints.NORTHWEST;
			gbc_btnDaG.gridx = 0;
			gbc_btnDaG.gridy = 0;
			buttonGroup.add(btnDaG);
			btnDaG.addActionListener(new BtnDaGActionListener());
			btnDaG.setSelected(true);
			pnlBotones.add(btnDaG, gbc_btnDaG);
		}
		{
			GridBagConstraints gbc_btnInfo = new GridBagConstraints();
			gbc_btnInfo.fill = GridBagConstraints.HORIZONTAL;
			gbc_btnInfo.insets = new Insets(0, 0, 5, 0);
			gbc_btnInfo.gridx = 0;
			gbc_btnInfo.gridy = 2;
			buttonGroup.add(btnInfo);
			btnInfo.addActionListener(new BtnInfoActionListener());
			pnlBotones.add(btnInfo, gbc_btnInfo);
		}
		{
			GridBagConstraints gbc_tglbtnDatosAdjuntos = new GridBagConstraints();
			gbc_tglbtnDatosAdjuntos.gridx = 0;
			gbc_tglbtnDatosAdjuntos.gridy = 4;
			buttonGroup.add(tglbtnDatosAdjuntos);
			tglbtnDatosAdjuntos.addActionListener(new TglbtnDatosAdjuntosActionListener());
			pnlBotones.add(tglbtnDatosAdjuntos, gbc_tglbtnDatosAdjuntos);
		}
		{
			panel.add(pnlContenido, BorderLayout.CENTER);
		}
		pnlContenido.setLayout(new CardLayout(0, 0));
		{
			pnlGeneral.setBorder(new LineBorder(new Color(0, 0, 0), 1, true));
			pnlContenido.add(pnlGeneral, "Panel1");
		}
		GridBagLayout gbl_pnlGeneral = new GridBagLayout();
		gbl_pnlGeneral.columnWidths = new int[]{60, 0, 87, 178, 0, 95, 0, 0, 0, 0, 64, 0};
		gbl_pnlGeneral.rowHeights = new int[]{47, 0, 0, 0, 0, 0, 0, 0, 47, 0, 104, 29, 0, 0, 0, 0};
		gbl_pnlGeneral.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_pnlGeneral.rowWeights = new double[]{0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		pnlGeneral.setLayout(gbl_pnlGeneral);

		{
			GridBagConstraints gbc_lblNombre = new GridBagConstraints();
			gbc_lblNombre.anchor = GridBagConstraints.WEST;
			gbc_lblNombre.insets = new Insets(0, 0, 5, 5);
			gbc_lblNombre.gridx = 2;
			gbc_lblNombre.gridy = 1;
			pnlGeneral.add(lblNombre, gbc_lblNombre);
		}
		{
			GridBagConstraints gbc_textField = new GridBagConstraints();
			gbc_textField.insets = new Insets(0, 0, 5, 5);
			gbc_textField.fill = GridBagConstraints.HORIZONTAL;
			gbc_textField.gridx = 3;
			gbc_textField.gridy = 1;
			pnlGeneral.add(textField, gbc_textField);
		}
		{
			GridBagConstraints gbc_lblInicioTratamiento = new GridBagConstraints();
			gbc_lblInicioTratamiento.anchor = GridBagConstraints.WEST;
			gbc_lblInicioTratamiento.insets = new Insets(0, 0, 5, 5);
			gbc_lblInicioTratamiento.gridx = 7;
			gbc_lblInicioTratamiento.gridy = 2;
			pnlGeneral.add(lblInicioTratamiento, gbc_lblInicioTratamiento);
		}
		{
			GridBagConstraints gbc_textField_3 = new GridBagConstraints();
			gbc_textField_3.insets = new Insets(0, 0, 5, 5);
			gbc_textField_3.fill = GridBagConstraints.HORIZONTAL;
			gbc_textField_3.gridx = 8;
			gbc_textField_3.gridy = 2;
			pnlGeneral.add(textField_3, gbc_textField_3);
		}
		{
			GridBagConstraints gbc_btnInicio = new GridBagConstraints();
			gbc_btnInicio.insets = new Insets(0, 0, 5, 5);
			gbc_btnInicio.gridx = 9;
			gbc_btnInicio.gridy = 2;
			btnInicio.setIcon(new ImageIcon(Informes.class.getResource("/com/toedter/calendar/images/JDateChooserColor32.gif")));
			pnlGeneral.add(btnInicio, gbc_btnInicio);
		}
		{
			GridBagConstraints gbc_lblFechaDeCreacin = new GridBagConstraints();
			gbc_lblFechaDeCreacin.fill = GridBagConstraints.VERTICAL;
			gbc_lblFechaDeCreacin.anchor = GridBagConstraints.WEST;
			gbc_lblFechaDeCreacin.insets = new Insets(0, 0, 5, 5);
			gbc_lblFechaDeCreacin.gridx = 2;
			gbc_lblFechaDeCreacin.gridy = 3;
			pnlGeneral.add(lblFechaDeCreacin, gbc_lblFechaDeCreacin);
		}
		{
			GridBagConstraints gbc_textField_1 = new GridBagConstraints();
			gbc_textField_1.insets = new Insets(0, 0, 5, 5);
			gbc_textField_1.fill = GridBagConstraints.HORIZONTAL;
			gbc_textField_1.gridx = 3;
			gbc_textField_1.gridy = 3;
			pnlGeneral.add(textField_1, gbc_textField_1);
			
		}
		{
			GridBagConstraints gbc_lblNSesiones = new GridBagConstraints();
			gbc_lblNSesiones.anchor = GridBagConstraints.WEST;
			gbc_lblNSesiones.insets = new Insets(0, 0, 5, 5);
			gbc_lblNSesiones.gridx = 7;
			gbc_lblNSesiones.gridy = 4;
			pnlGeneral.add(lblNSesiones, gbc_lblNSesiones);
		}
		{
			GridBagConstraints gbc_spinner = new GridBagConstraints();
			gbc_spinner.fill = GridBagConstraints.HORIZONTAL;
			gbc_spinner.insets = new Insets(0, 0, 5, 5);
			gbc_spinner.gridx = 8;
			gbc_spinner.gridy = 4;
			spinner.setModel(new SpinnerNumberModel(0, null, 20, 1));
			pnlGeneral.add(spinner, gbc_spinner);
		}
		{
			GridBagConstraints gbc_lblPaciente = new GridBagConstraints();
			gbc_lblPaciente.fill = GridBagConstraints.VERTICAL;
			gbc_lblPaciente.insets = new Insets(0, 0, 5, 5);
			gbc_lblPaciente.anchor = GridBagConstraints.WEST;
			gbc_lblPaciente.gridx = 2;
			gbc_lblPaciente.gridy = 5;
			pnlGeneral.add(lblPaciente, gbc_lblPaciente);
		}
		{
			GridBagConstraints gbc_textField_2 = new GridBagConstraints();
			gbc_textField_2.insets = new Insets(0, 0, 5, 5);
			gbc_textField_2.fill = GridBagConstraints.HORIZONTAL;
			gbc_textField_2.gridx = 3;
			gbc_textField_2.gridy = 5;
			pnlGeneral.add(textField_2, gbc_textField_2);
		}
		{
			GridBagConstraints gbc_lblNewLabel = new GridBagConstraints();
			gbc_lblNewLabel.anchor = GridBagConstraints.WEST;
			gbc_lblNewLabel.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel.gridx = 7;
			gbc_lblNewLabel.gridy = 6;
			pnlGeneral.add(lblNewLabel, gbc_lblNewLabel);
		}
		{
			GridBagConstraints gbc_textField_5 = new GridBagConstraints();
			gbc_textField_5.insets = new Insets(0, 0, 5, 5);
			gbc_textField_5.fill = GridBagConstraints.HORIZONTAL;
			gbc_textField_5.gridx = 8;
			gbc_textField_5.gridy = 6;
			pnlGeneral.add(textField_5, gbc_textField_5);
		}
		{
			GridBagConstraints gbc_button = new GridBagConstraints();
			gbc_button.insets = new Insets(0, 0, 5, 5);
			gbc_button.gridx = 9;
			gbc_button.gridy = 6;
			button.setIcon(new ImageIcon(Informes.class.getResource("/com/toedter/calendar/images/JDateChooserColor32.gif")));
			pnlGeneral.add(button, gbc_button);
		}
		{
			GridBagConstraints gbc_lblSaniario = new GridBagConstraints();
			gbc_lblSaniario.fill = GridBagConstraints.VERTICAL;
			gbc_lblSaniario.insets = new Insets(0, 0, 5, 5);
			gbc_lblSaniario.anchor = GridBagConstraints.WEST;
			gbc_lblSaniario.gridx = 2;
			gbc_lblSaniario.gridy = 7;
			pnlGeneral.add(lblSaniario, gbc_lblSaniario);
		}
		{
			GridBagConstraints gbc_comboBox = new GridBagConstraints();
			gbc_comboBox.insets = new Insets(0, 0, 5, 5);
			gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
			gbc_comboBox.gridx = 3;
			gbc_comboBox.gridy = 7;
			pnlGeneral.add(comboBox, gbc_comboBox);
		}
		{
			GridBagConstraints gbc_lblNotasDiagnostico = new GridBagConstraints();
			gbc_lblNotasDiagnostico.anchor = GridBagConstraints.WEST;
			gbc_lblNotasDiagnostico.insets = new Insets(0, 0, 5, 5);
			gbc_lblNotasDiagnostico.gridx = 2;
			gbc_lblNotasDiagnostico.gridy = 9;
			pnlGeneral.add(lblNotasDiagnostico, gbc_lblNotasDiagnostico);
		}
		{
			GridBagConstraints gbc_scrollPane_3 = new GridBagConstraints();
			gbc_scrollPane_3.gridwidth = 6;
			gbc_scrollPane_3.insets = new Insets(0, 0, 5, 5);
			gbc_scrollPane_3.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_3.gridx = 3;
			gbc_scrollPane_3.gridy = 10;
			pnlGeneral.add(scrollPane_3, gbc_scrollPane_3);
		}
		{
			scrollPane_3.setViewportView(taNotas);
			taNotas.setIgnoreRepaint(true);
			taNotas.setWrapStyleWord(true);
			taNotas.setLineWrap(true);
			taNotas.setMinimumSize(new Dimension(200, 200));
			taNotas.setMaximumSize(new Dimension(200, 200));
		}
		{
			GridBagConstraints gbc_btnModificar = new GridBagConstraints();
			gbc_btnModificar.fill = GridBagConstraints.BOTH;
			gbc_btnModificar.insets = new Insets(0, 0, 5, 5);
			gbc_btnModificar.gridx = 2;
			gbc_btnModificar.gridy = 12;
			pnlGeneral.add(btnModificar, gbc_btnModificar);
		}
		{
			GridBagConstraints gbc_btnBorrar = new GridBagConstraints();
			gbc_btnBorrar.fill = GridBagConstraints.VERTICAL;
			gbc_btnBorrar.insets = new Insets(0, 0, 5, 5);
			gbc_btnBorrar.gridx = 3;
			gbc_btnBorrar.gridy = 12;
			pnlGeneral.add(btnBorrar, gbc_btnBorrar);
		}
		{
			GridBagConstraints gbc_btnGuardar = new GridBagConstraints();
			gbc_btnGuardar.fill = GridBagConstraints.BOTH;
			gbc_btnGuardar.insets = new Insets(0, 0, 5, 5);
			gbc_btnGuardar.gridx = 8;
			gbc_btnGuardar.gridy = 12;
			pnlGeneral.add(btnGuardar, gbc_btnGuardar);
		}
		{
			pnlContenido.add(pnlInfo, "Panel2");
		}
		GridBagLayout gbl_pnlInfo = new GridBagLayout();
		gbl_pnlInfo.columnWidths = new int[]{94, 0, 538, 0, 0};
		gbl_pnlInfo.rowHeights = new int[]{23, 0, 110, 17, 0, 110, 17, 0, 110, 46, 0, 0};
		gbl_pnlInfo.columnWeights = new double[]{0.0, 0.0, 0.0, 0.0, Double.MIN_VALUE};
		gbl_pnlInfo.rowWeights = new double[]{0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 0.0, Double.MIN_VALUE};
		pnlInfo.setLayout(gbl_pnlInfo);
		{
			GridBagConstraints gbc_lblNewLabel_1 = new GridBagConstraints();
			gbc_lblNewLabel_1.anchor = GridBagConstraints.WEST;
			gbc_lblNewLabel_1.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_1.gridx = 1;
			gbc_lblNewLabel_1.gridy = 1;
			pnlInfo.add(lblNewLabel_1, gbc_lblNewLabel_1);
		}
		{
			GridBagConstraints gbc_scrollPane = new GridBagConstraints();
			gbc_scrollPane.gridwidth = 2;
			gbc_scrollPane.insets = new Insets(0, 0, 5, 5);
			gbc_scrollPane.fill = GridBagConstraints.BOTH;
			gbc_scrollPane.gridx = 1;
			gbc_scrollPane.gridy = 2;
			pnlInfo.add(scrollPane, gbc_scrollPane);
		}
		taAntecedentes.setLineWrap(true);
		taAntecedentes.setWrapStyleWord(true);
		scrollPane.setViewportView(taAntecedentes);
		{
			GridBagConstraints gbc_lblNewLabel_2 = new GridBagConstraints();
			gbc_lblNewLabel_2.anchor = GridBagConstraints.WEST;
			gbc_lblNewLabel_2.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_2.gridx = 1;
			gbc_lblNewLabel_2.gridy = 4;
			pnlInfo.add(lblNewLabel_2, gbc_lblNewLabel_2);
		}
		{
			GridBagConstraints gbc_scrollPane_1 = new GridBagConstraints();
			gbc_scrollPane_1.gridwidth = 2;
			gbc_scrollPane_1.insets = new Insets(0, 0, 5, 5);
			gbc_scrollPane_1.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_1.gridx = 1;
			gbc_scrollPane_1.gridy = 5;
			pnlInfo.add(scrollPane_1, gbc_scrollPane_1);
		}
		taPruebas.setWrapStyleWord(true);
		taPruebas.setLineWrap(true);
		scrollPane_1.setViewportView(taPruebas);
		{
			GridBagConstraints gbc_lblNewLabel_3 = new GridBagConstraints();
			gbc_lblNewLabel_3.anchor = GridBagConstraints.WEST;
			gbc_lblNewLabel_3.insets = new Insets(0, 0, 5, 5);
			gbc_lblNewLabel_3.gridx = 1;
			gbc_lblNewLabel_3.gridy = 7;
			pnlInfo.add(lblNewLabel_3, gbc_lblNewLabel_3);
		}
		{
			GridBagConstraints gbc_scrollPane_2 = new GridBagConstraints();
			gbc_scrollPane_2.gridwidth = 2;
			gbc_scrollPane_2.insets = new Insets(0, 0, 5, 5);
			gbc_scrollPane_2.fill = GridBagConstraints.BOTH;
			gbc_scrollPane_2.gridx = 1;
			gbc_scrollPane_2.gridy = 8;
			pnlInfo.add(scrollPane_2, gbc_scrollPane_2);
		}
		textArea_1.setWrapStyleWord(true);
		textArea_1.setLineWrap(true);
		scrollPane_2.setViewportView(textArea_1);
		{
			pnlContenido.add(pnlDatos, "Panel3");
		}
		pnlDatos.setLayout(null);
		{
			list.setBounds(75, 54, 236, 225);
			pnlDatos.add(list);
		}
		{
			label.setBounds(614, 199, 61, 16);
			pnlDatos.add(label);
		}
		{
			btnCargarFoto.setBounds(601, 420, 117, 29);
			pnlDatos.add(btnCargarFoto);
		}
		{
			panel_2.setBackground(Color.WHITE);
			contentPane.add(panel_2, BorderLayout.NORTH);
		}
		{
			lblNewLabel_4.setIcon(new ImageIcon(Informes.class.getResource("/Imagenes/icono.png")));
			panel_2.add(lblNewLabel_4);
		}
		
	}

	
	private class BtnDaGActionListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			CardLayout cl = (CardLayout)(pnlContenido.getLayout());
	        cl.show(pnlContenido,"Panel1");
		}
	}
	private class BtnInfoActionListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			CardLayout cl = (CardLayout)(pnlContenido.getLayout());
	        cl.show(pnlContenido,"Panel2");
		}
	}
	private class TglbtnDatosAdjuntosActionListener implements ActionListener {
		public void actionPerformed(ActionEvent e) {
			CardLayout cl = (CardLayout)(pnlContenido.getLayout());
	        cl.show(pnlContenido,"Panel3");

		}
	}
	
	
	
	
}
